const types = {
  /**
   * group=菜单分组
   */
  GROUP: {type: 'group', name: '菜单分组'},
  /**
   * cgform=online表单
   */
  CGFORM: {type: 'cgform', name: 'online表单'},
  /**
   * desform=设计器表单
   */
  DESFORM: {type: 'desform', name: '设计器表单'},
  /**
   * cgreport=Online报表
   */
  CGREPORT: {type: 'cgreport', name: 'Online报表'},
  /**
   * jimureport=积木报表 o2ulDNOXGwvBRndehxW14dML+i/qxuVry2u3TXIhR9CrYEbhZi7RywQnYojV/SgC/PffdTE3WKU0/u0CXtgFzw==
   */
  JIMUREPORT: {type: 'jimureport', name: '积木报表'},
  /**
   * process=流程
   */
  PROCESS: {type: 'process', name: '流程'},

}

export default {
  ...types,

  valueOf(type) {
    if (types[type]) {
      return types[type]
    }
    for (let item of Object.values(types)) {
      if (item.type === type) {
        return item
      }
    }
    return null
  },
}
